export const formatTime = (time: number) => {
  const minutes = Math.floor(time / 60)
  const seconds = Math.floor(time % 60)
  return `${minutes}:${seconds.toString().padStart(2, '0')}`
}

export const formatDate = (date: string) => {
  return new Date(date).toLocaleDateString()
}

export const formatPlayCount = (count: number) => {
  if (count > 100000000) {
    return Math.floor(count / 100000000) + '亿'
  }
  if (count > 10000) {
    return Math.floor(count / 10000) + '万'
  }
  return count.toString()
} 